import { http } from '@/utils'
export const getUserInfo = () => {
  return async (dispatch, getState) => {
    const res = await http.get('/user/profile', {
      headers: {
        Authorization: `Bearer ${getState().login}`,
      },
    })
    // console.log(res)
    dispatch({ type: 'login/getInfo', payload: res.data.data })
  }
}
